#ifndef _NSTAR_TS_PARSE_H
#define _NSTAR_TS_PARSE_H

enum {
    pgCmdHold  = 0,
	pgCmdPlay  = 1,
	pgCmdStop  = 2,
	pgCmdDrill = 3
};

typedef struct {
	unsigned char cmdLv;
	unsigned char  logicAddr[6];
	unsigned char swSta;
	unsigned char  emFlag;
	unsigned short  pgId;
	unsigned short lastPgid;
	unsigned int playwcnt;
	unsigned int cmdwcnt;
}PgInfo;



extern PgInfo current_pg;
extern void PgCmd_Reinit(PgInfo* pg);
extern void PgCmd_Stop(PgInfo* pg);


unsigned char nstar_pack_loadbytes(unsigned char *buf, unsigned char buflen, unsigned char type);


unsigned char nstar_parse_msg(unsigned char *buf, unsigned short buflen);
void player_manage(PgInfo* pg);


extern void ebm_play_manage_loop(void);
extern void ebm_play_cmd_open(void);
extern void ebm_play_cmd_keepon(void);
extern void ebm_play_cmd_stop(void);



#endif 

